package top.mable;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.serviceregistry.AutoServiceRegistrationAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import top.mable.dto.GpPayFeeInfoDTO;

import java.util.HashMap;
import java.util.Map;

@SpringBootApplication
public class MybatisApp {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(MybatisApp.class, args);
        boolean b = context.containsBean("autoServiceRegistrationAutoConfiguration");

        System.out.println("是否包含类autoServiceRegistrationAutoConfiguration="+b);

        String[] beanNamesForType = context.getBeanNamesForType(AutoServiceRegistrationAutoConfiguration.class);

        System.out.println(beanNamesForType[0]);

        Map<String,Object> data = new HashMap<>();
        data.put("name","温白猴");

        Formatter bean = context.getBean(Formatter.class);
        System.out.println("类名：" + bean.getClass().getSimpleName() + bean.format(data));
    }
}
